home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
FROMUTS
/
ARCAUT
/
Automatons
/
DLA
< prev
next >
Wrap
Text File
|
1991-07-27
|
2KB
|
57 lines
AUTOMATON*
DLA
This is an interesting automaton. It simulates the physical process known
as diffusion limited aggregation. An example screen of a typical resultant
object, known as a dendrite, is included in the screens directory, disc
space permitting; to view it run the automaton with a window 256x256, click
menu, select the load option & enter the name 'den1'. The process of DLA
works as follows. Take an initial seed, in this case a point & introduce
some randomly moving particles (as in the Brownian Motion automaton). Allow
the particles to wander until one comes close to the seed; as soon as this
happens, the particle concerned 'adheres' to the seed & becomes a part of
it. This results in a gradually growing stable structure, the shape of
which should be quite familiar - similar processes frequently occur in
nature; for example the way that frost spreads across a window or mould
grows on a wall. Differing degrees of stringiness/clumping can be produced
by altering the initial density of wandering particles; this is controlled
by the final parameter in the call to PROCsoup below. You might also like
to try using a more complex initial seed, such as a line or circle. The
Margolus neighbourhood is of course used, to enable the easy programming
required to make the particles wander. A window of 50x50 will very quickly
give you a good idea of how the process works; a full screen version
(256x256), with the initial density below of 20 percent will take about
half an hour until all particles are caught.
INITIALISATION*
10DEF PROCdo
20*SetEval wrap on
30*SetEval neig margolus
40*SetEval rndb -1
50*SetEval i 1
60*SetEval t 249
70*SetEval b 17
80ENDPROC
SCREEN*
10DEF PROCdo
20c%=FNacol(45)
30PROCsoup(255,1,.2)
40GCOL c%AND63 TINT c%:POINT 0,0
50ENDPROC
CODE*
( READ_NEIG
CELL IF (CELL 255 <> IF (CELL ==))
1 254 MCOUNT_NEIG IF (CELL IF (
OPP IF (OPP 255 <> IF (OPP <i> - DUP <b> >= IF (==) <t> ==))
CW IF ( CW 255 <> IF ( CW <i> - DUP <b> >= IF (==) <t> ==))
CCW <i> - DUP <b> >= IF (==) <t> == )
CELL == )
2RNDB IF (CCW ==) CW == )
END*